
package net.swa.dewei.beans.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/***
 * 得威一卡通购物车实体类
 * @author dawei    
 *
 */
@Entity
@Table(name = "t_life_car")
public class LifeCardCar
{
    //PK
    private Long id;

    private Long goodsId;

    private int num;

    //要购物车就要有用户
    private String wxid;

    /**创建时间**/
    private String createDate;

    /**更新时间**/
    private String updateDate;

    //该商品总价格，不做数据库映射
    private Double totalMony;

    //商品名称，不做数据库映射
    private String name;

    //商品价格，不做数据库映射
    private double cardprice;

    //商品图片，不做数据库映射
    private String imgUrl;

    @GenericGenerator(name = "generator", strategy = "native")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "id", unique = true, nullable = false)
    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getCreateDate()
    {
        return createDate;
    }

    public void setCreateDate(String createDate)
    {
        this.createDate = createDate;
    }

    public String getUpdateDate()
    {
        return updateDate;
    }

    public void setUpdateDate(String updateDate)
    {
        this.updateDate = updateDate;
    }

    public Long getGoodsId()
    {
        return goodsId;
    }

    public void setGoodsId(Long goodsId)
    {
        this.goodsId = goodsId;
    }

    public int getNum()
    {
        return num;
    }

    public void setNum(int num)
    {
        this.num = num;
    }

    public String getWxid()
    {
        return wxid;
    }

    public void setWxid(String wxid)
    {
        this.wxid = wxid;
    }

    @Transient
    public Double getTotalMony()
    {
        return totalMony;
    }

    public void setTotalMony(Double totalMony)
    {
        this.totalMony = totalMony;
    }

    @Transient
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @Transient
    public double getCardprice()
    {
        return cardprice;
    }

    public void setCardprice(double cardprice)
    {
        this.cardprice = cardprice;
    }

    @Transient
    public String getImgUrl()
    {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl)
    {
        this.imgUrl = imgUrl;
    }

}
